Skip to main content

Set Text

AutomatR.Windows.Activities.SetText

The "Set Text" activity in AutomatR is designed for UI Automation within Windows applications. It allows you to write a string to the Text attribute of a specified UI element, facilitating data entry and manipulation in automation workflows.

Properties

NameDescription
Input
Clear TextWhen enabled, it clears the content of the element before writing new content to it.
ElementSelect the browse button to indicate the element on the app with the help of the Window selector window.
TextEnter the string text in the text box as per the UI element selected.
SelectorWindows Selector - Editor for selecting UI elements within the Windows application.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before starting the "Set Text" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
TimeoutEnter the time in seconds (e.g., 5) for the activity to be executed before throwing an exception. If not provided, the default timeout value is used.

How to use:

  1. Drag and drop the "Set Text" activity onto the workflow.
  2. Configure the properties by providing either the Element or Selector, specifying the text to be set, and choosing whether to clear existing text.
  3. Optionally, configure the Delay and Timeout properties.
  4. Execute the workflow to write the specified text to the designated UI element.

Example: Consider an example where the "Set Text" activity is used to set a text value in a text box:

Set Text:
Element: [Selector indicating the text box]
Text: "Hello, AutomatR!"
Clear Text: true
Delay: 2
Timeout: 10

In this example, the activity sets the text "Hello, AutomatR!" in the specified text box element, clearing any existing text, introducing a 2-second delay, and a timeout of 10 seconds for the operation.